<form method="POST" action="">

    <textarea style="width:98%;"></textarea>
    <div style="float: right">
        <select>
            <option><?=$this->lang->line('select_status');?></option>
            <?php foreach ($statuses as $status): ?>
                <option><?= $status['Name'] ?></option>
            <?php endforeach; ?>
            </select>
            <input type="submit" name="save"  value="<?=$this->lang->line('add');?>"/>
        </div>
    </form>
<?php if ($tasks): ?>
    <fieldset>
        <legend style="background-color: #00FF00"><b><?=$this->lang->line('task_now');?>:</b></legend>
        <table>
            <thead>
                <tr>
                    <th>Тип</th><th>Дата</th><th><?=$this->lang->line('tasks');?></th><th><?=$this->lang->line('kill_task');?></th>
                </tr>
            <tbody>

                <tr>
                    <td><?= $tasks[0]['Name'] ?></td><td><?= $tasks[0]['Date'] ?> </td><td><?= $tasks[0]['Note'] ?> </td><td align="center"><a href=""><?=$this->lang->line('tic');?></a></td>
                </tr>

            </tbody>

            </body>
        </table>
    </fieldset>
<?php if ($tasks['history']): ?>

                    <fieldset>
                        <legend style="background-color: plum"><b><?=$this->lang->line('tasl_last');?>:</b></legend>


                        <table>
                            <thead>
                                <tr>
                                    <th>Тип</th><th>Дата</th><th><?=$this->lang->line('tasks');?></th>
                                </tr>
                            <tbody>
            <?php foreach ($tasks['history'] as $task): ?>
                        <tr>
                            <td><?= $task['Name'] ?></td><td><?= $task['Date'] ?> </td><td><?= $task['Note'] ?> </td>
                        </tr>
            <?php endforeach; ?>
                    </tbody>

                    </body>
                </table>

            </fieldset>            



                            
<?php endif; ?>
<?php else: ?>

                        <?=$this->lang->line('no_task');?>
<?php endif; ?>